package com.alipay.app.groupmeal.standard.ui.b.function.amount;

import android.content.Context;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.alipay.app.groupmeal.standard.R;
import com.alipay.app.groupmeal.standard.widget.InputAmountFitViewTextView;
import com.alipay.app.groupmeal.standard.widget.InputAmountView;
import com.alipay.app.groupmeal.standard.widget.business.BaseBScreenView;

public class BScreenAwaitPay extends BaseBScreenView {

    private TextView tv_title;
    private InputAmountView tv_amount;

    public BScreenAwaitPay(Context context) {
        super(context);
    }

    public BScreenAwaitPay(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.view_await_pay;
    }

    @Override
    protected void initView(View view) {
        tv_title = findViewById(R.id.tv_title);
        tv_amount = findViewById(R.id.tv_amount);
    }

    @Override
    protected void initData() {

    }

    public void setTitle(String title) {
        if (tv_title != null) {
            tv_title.setText(title);
        }
    }

    public void setAmount(String amount) {
        if (tv_amount != null) {
            tv_amount.setText(amount);
            if ("".equals(amount)) {
                tv_amount.setVisibility(GONE);
            }
        }

    }

    public String getAmount() {
        return tv_amount.getText().toString();
    }


}
